rm -rf /tmp/data/*
rm -rf /data

mkdir /data
tar -xvf data.tar -C /data

curl -XPOST -d '{"hosts":["172.16.0.180","172.16.0.179","172.16.0.197"],"index":1}' 172.16.0.180:8080/updateCluster
curl -XPOST -d '{"hosts":["172.16.0.180","172.16.0.179","172.16.0.197"],"index":2}' 172.16.0.179:8080/updateCluster
curl -XPOST -d '{"hosts":["172.16.0.180","172.16.0.179","172.16.0.197"],"index":3}' 172.16.0.197:8080/updateCluster

curl 172.16.0.180:8080/init
curl 172.16.0.179:8080/init
curl 172.16.0.197:8080/init


for i in {1..3} ; do
  for j in {0..100} ; do
      curl 172.16.0.180:8080/query/key${i}-${j}
      echo ""
  done
done

for i in {1..3} ; do
  for j in {0..100} ; do
      curl 172.16.0.179:8080/query/key${i}-${j}
      echo ""
  done
done


for i in {1..3} ; do
  for j in {0..100} ; do
      curl 172.16.0.197:8080/query/key${i}-${j}
      echo ""
  done
done
